package ynu.edu.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import ynu.edu.entity.User;

/**
 * 用户基本信息服务Feign客户端
 * 使用断路器实例A进行容错保护
 */
@FeignClient(name = "provider-service", contextId = "basicUserService", fallback = ServiceProviderServiceFallbackA.class)
public interface ServiceProviderService {
    
    /**
     * 根据用户ID获取用户基本信息
     * @param userId 用户ID
     * @return 用户信息
     */
    @GetMapping("/user/getUserById/{userId}")
    User GetUserById(@PathVariable("userId") Integer userId);
}
